package canvas;

/**
* Created by IntelliJ IDEA.
* User: ilya
* Date: 01.12.2010
* Time: 18:04:28
*/
public class Triangle implements Figure {

    private int a;
    private int h;

    public Triangle (int a, int h) {
        this.a = a;
        this.h = h;
    }

    public void draw(Canvas c) {
        c.drawLine(0, 0, - a/2, h);
        c.drawLine(- a/2, h, + a/2, h);
        c.drawLine(+ a/2, h, 0, 0);
    }
}
